//
// Created by xili on 2024/8/18 16:18.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    bool checkRecord(string s) {
        unordered_map<char, int> ump;
        bool late = true;
        int count = 0;
        for (auto &item: s) {
            if (item == 'L') {
                count++;
                if (count >= 3) {
                    return false;
                }
            } else {
                count = 0;
            }
            ump[item]++;
        }
        return ump['A'] < 2;
    }
};
